package com.meiyue.bean.entity;

import javax.persistence.*;

/**
 * MeiyueJavaProject
 * com.meiyue.bean.entity
 * Created by Chris Chen
 * 2017/9/14
 * Explain:
 */
@Entity
@Table(name = "test_vehicle_trunk_size", schema = "test_yuedao", catalog = "")
public class TestVehicleTrunkSizeEntity {
    private int id;
    private String trunkSize;

    @Id
    @Column(name = "id", nullable = false)
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "trunk_size", nullable = false, length = 100)
    public String getTrunkSize() {
        return trunkSize;
    }

    public void setTrunkSize(String trunkSize) {
        this.trunkSize = trunkSize;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        TestVehicleTrunkSizeEntity that = (TestVehicleTrunkSizeEntity) o;

        if (id != that.id) return false;
        if (trunkSize != null ? !trunkSize.equals(that.trunkSize) : that.trunkSize != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id;
        result = 31 * result + (trunkSize != null ? trunkSize.hashCode() : 0);
        return result;
    }
}
